<template>
  <web-view :src="url" @message="bindMessage" @load="bindLoad" id="web-view-1"></web-view>
</template>

<script setup lang="ts">
import { ensureDecodeURIComponent } from '@/utils'



const url = ref('')
onLoad((options) => {
  console.log('打印***options', options, ensureDecodeURIComponent(options.url))
  if (options.url) {

    url.value = ensureDecodeURIComponent(options.url)
  }
})

const bindMessage = (e) => {
  console.log(e)
  console.log('打印***bindMessage', e)

}
const bindLoad = (e) => {
  console.log('打印***bindLoad', e)
}

onShareAppMessage(() => ({
  title: 'uniapp案例演示',
  path: '/pages/demo/index'
}));
</script>

<style lang="scss" scoped></style>
